import { API_DOMAINS, http } from '@/http/request/alova'
// banner fields
export interface Banner {
  redirect_url: string
  image: string
  [key: string]: any
}
// 服务 fields
export interface Service {
	id: number
	home_name: string
	price: string | number
	icon: string
	banner: string
	detail: string
	image: string
	[key: string]: any;
}

export interface HomeBasic {
	service: Service[];
	banner: Banner[];
	[key: string]: any;
}
// 获取首页数据
export function getHomeData(params: AnyObject) {
  return http.Get<HomeBasic>('/api/service/recommend', {
    params,
    meta: { domain: API_DOMAINS.SECONDARY }, // 用于切换请求地址
  })
}

// 获取门店列表
export function getStoreList() {
  return http.Get<Record<string, any>>('/api/address/shop', {
    meta: { domain: API_DOMAINS.SECONDARY }, // 用于切换请求地址
  })
}
